﻿@using AmorCanino.Web.Models.Models
@model List<Article>
<div class="ca-container">
    <div class="ca-wrapper">
        @foreach (var article in Model)
        {
            string picture = string.Empty;
            if (article.Picture == Guid.Empty) {
                picture = Url.Content("~/Content/noPic.png");
            } else {
                picture =Url.Content("~/ImageServices/getThumbnail.pet?pictureId=" + article.Picture.ToString() + "&pictureType=article");
            }
            
            <div class="ca-item">
                <div class="table">
                    <div class="row">
                        <img src="@picture"
                            alt="@article.Name" title="@article.Name" />
                    </div>
                    <div class="row carousel-name" title="@article.Name">@article.Name</div>
                    <div class="row">
                        <div class="cell carousel-price">$ @Math.Round(article.Price, 2).ToString()</div>
                        <div class="cell">
                            <div class="BuyActionButton" data-productId="@article.ProductId">COMPRAR</div>
                        </div>
                    </div>
                </div>
            </div>
        }
    </div>
</div>